from base.port_item import PortItem
# from base_module import BaseModule
from base.cell import Cell

class RAMB18E1(Cell):
    
    def __init__(self) -> None:
        self.all_ports = []
        self.parameters = []
        # input_ports = []
        # output_ports = []
        self.port_dict = {}

        self.all_ports.append(PortItem(width=14,name="ADDRARDADDR",parent=self))
        self.all_ports.append(PortItem(width=14,name="ADDRBWRADDR",parent=self))
        self.all_ports.append(PortItem(width=16,name="DIADI",parent=self))
        self.all_ports.append(PortItem(width=16,name="DIBDI",parent=self))
        self.all_ports.append(PortItem(width=2,name="DIPADIP",parent=self))
        self.all_ports.append(PortItem(width=2,name="DIPBDIP",parent=self))
        self.all_ports.append(PortItem(width=2,name="WEA",parent=self))
        self.all_ports.append(PortItem(width=4,name="WEBWE",parent=self))
        self.all_ports.append(PortItem(name="CLKARDCLK",parent=self))
        self.all_ports.append(PortItem(name="CLKBWRCLK",parent=self))
        self.all_ports.append(PortItem(name="ENARDEN",parent=self))
        self.all_ports.append(PortItem(name="ENBWREN",parent=self))
        self.all_ports.append(PortItem(name="REGCEAREGCE",parent=self))
        self.all_ports.append(PortItem(name="REGCEB",parent=self))
        self.all_ports.append(PortItem(name="RSTRAMARSTRAM",parent=self))
        self.all_ports.append(PortItem(name="RSTRAMB",parent=self))
        self.all_ports.append(PortItem(name="RSTREGARSTREG",parent=self))
        self.all_ports.append(PortItem(name="RSTREGB",parent=self))
        self.all_ports.append(PortItem(name="DOADO",width=16,type="output",parent=self))
        self.all_ports.append(PortItem(name="DOBDO",width=16,type="output",parent=self))
        self.all_ports.append(PortItem(name="DOPADOP",width=2,type="output",parent=self))
        self.all_ports.append(PortItem(name="DOPBDOP",width=2,type="output",parent=self))
        
        pass
    

    # def get_port(self,name):
    #     pass

    def set_init(self,data):
        pass